/*
 * @Author: your name
 * @Date: 2022-01-21 17:12:37
 * @LastEditTime: 2022-01-29 16:41:29
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \my-app\src\routes\index.ts
 */
import { CSSProperties } from 'react'
import { Router } from '@/ts/router'
import { Spin } from 'antd'
// import Loadable from 'react-loadable'
import loadable from '@loadable/component'

const style: CSSProperties = {
	position: 'fixed',
	left: '50%',
	top: '50%',
	transform: 'translate(-50%,-50%)',
}
const Loadable = (url: any) => {
	return loadable(url, {
		fallback: <Spin style={style} tip='Loading...'></Spin>,
	})
}
const router: Router[] = [
	{
		path: '/',
		key: '/',
		component: Loadable(() => import('@/page/container/Container')),
	},
]
export default router
